<%@ page language="java"
	import="com.yb.util.comm.RequestUtil,com.yb.domain.member.TsSysuser,com.yb.util.comm.Contants;"
	pageEncoding="UTF-8" contentType="text/html; charset=utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>


<html xmlns="http://www.w3.org/1999/xhtml">
	<head>

		<title>${tgood.name}-幸福兄弟-幸福兄弟拼购网-抢购-${pcategory.name}-${category.name}</title>
		<meta name="description"
			content="幸福兄弟盐城拼购第一网www.9898sj.com是幸福兄弟营销策划有限公司旗下品牌项目。幸福兄弟盐城拼购第一网是专门针对建材、家具、电器进行同城拼购的一个网站。将全城千万消费者聚拢在一起，用量来获得最低的购买价格。网站聚集了全城1000个知名优质品牌，消费者足不出户就能完成对盐城建材、家具、电器市场进行最深刻的了解，通过拼购网购买是免费的，消费者不需要花一分钱就能实现最省钱、省心、舒心的购买。幸福兄弟盐城拼购第一网将帮助1000个优质品牌企业最大程度的宣传全城，帮助品牌企业好的口碑得到良好的传播，从而实现最好的销售。希望幸福兄弟盐城拼购第一网能为您的幸福生活、您的成功带来帮助！幸福生活，从拼购开始。公司地址，盐城市南城河路9号（迎宾桥北桥头东侧）；联系电话：0515-88175689  88175528" />
		<meta name="keywords"
			content="幸福兄弟，幸福兄弟盐城拼购第一网，幸福兄弟拼购，幸福兄弟拼购网，盐城拼购，盐城拼购，盐城建材拼购，盐城家具拼购，盐城电器拼购，建材拼购，家具拼购，电器拼购" />

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link href="<%=basePath%>resource/css/cssGood.css" rel="stylesheet"
			type="text/css" />
		<script type="text/javascript"
			src="<%=basePath%>resource/js/jquery-1.4.2.js"></script>
		<link rel="Shortcut Icon" type="image/x-icon"
			href="<%=basePath%>resource/img/favicon.ico" media="screen" />
		<style type="text/css">
			.left2-4 SPAN {
				MARGIN-TOP: 0px; WIDTH: 78px; DISPLAY: inline-block; FLOAT: right; HEIGHT: 30px; COLOR: #4e4347; FONT-SIZE: 12px; FONT-WEIGHT: 600; PADDING-TOP: 2px;padding-right: 3px;line-height: 30px;
			}	
			#left .leftBody {
				WIDTH: 256px; BACKGROUND: url(<%=basePath %>resource/img/zhongjian.jpg) repeat-y
			}
			#left .leftTop {
				WIDTH: 256px; background: url("<%=basePath %>resource/img/index/bd-qg.gif") no-repeat; HEIGHT: 36px
			}
			#left .leftBotton {
				WIDTH: 256px; BACKGROUND: url(<%=basePath %>resource/img/chuyidiandian.jpg) 0px -5px no-repeat; HEIGHT: 5px;
			}
			.tijiao {
				BACKGROUND-IMAGE: url(<%=basePath %>resource/img/index/tijiao.jpg); TEXT-ALIGN: center; PADDING-BOTTOM: 5px; LINE-HEIGHT: 28px; PADDING-LEFT: 90px; WIDTH: 65px; BACKGROUND-REPEAT: no-repeat; BACKGROUND-POSITION: right center; FLOAT: left; HEIGHT: 28px; COLOR: #fff; FONT-SIZE: 14px; FONT-WEIGHT: bold; PADDING-TOP: 5px
			}
			.tijiao A {
				COLOR: #fff
			}
			.tijiao A:hover {
				COLOR: #036
			}
			.quandianping1 {
				BORDER-BOTTOM: #9c9 1px dashed; BORDER-LEFT: #9c9 1px dashed; LINE-HEIGHT: 24px; BACKGROUND-COLOR: #f7f5f4; FONT-SIZE: 12px; BORDER-TOP: #9c9 1px dashed; BORDER-RIGHT: #9c9 1px dashed;text-align: left;
			}
			.quandianping2 {
				PADDING-BOTTOM: 5px; LINE-HEIGHT: 20px; PADDING-LEFT: 5px; FONT-SIZE: 14px; PADDING-TOP: 5px
			}
		</style>	
		<script>
		function drawJoinMem(count){
			if(count == undefined || count == null || count == ''){
				count = '0';
			}
			var str = '';
			switch(count.length){
				case 1:;
				case 2:
				   if(parseInt(count,10)<10){
				   	 str += '<img src="<%=basePath%>resource/img/0.jpg"/><img style="margin-left:1px;" src="<%=basePath%>resource/img/'+parseInt(count,10)+'.jpg"/>';
				   }else{
				   	 str += '<img src="<%=basePath%>resource/img/'+Math.floor(count/10)+'.jpg"/><img style="margin-left:1px;" src="<%=basePath%>resource/img/'+(count%10)+'.jpg"/>';
				   }
				   break;
				case 3:
				   	 str += '<img src="<%=basePath%>resource/img/'+parseInt(count.substr(0,1),10)+'.jpg"/><img style="margin-left:1px;" src="<%=basePath%>resource/img/'+parseInt(count.substr(1,1),10)+'.jpg"/><img style="margin-left:1px;" src="<%=basePath%>resource/img/'+parseInt(count.substring(2),10)+'.jpg"/>';
				   break;
			}
			document.write(str);
		}
	</script>
			
	</head>

	<body id="top">

		<%
			String userid = "";
			TsSysuser tsSysuser = (TsSysuser) RequestUtil
					.getLoginUserFromSession(request, Contants.SESSION_USER);
			if (tsSysuser != null) {
				userid = tsSysuser.getId().toString();
			}
		%>
		<div id="top-1">
			<div class="top-1-left">
				<a href="javascript:addfavorite()" title="收藏本站">收藏本站</a>
			</div>
			<%
					String userType = "";
					if (tsSysuser == null) {
				%>
				<div class="top-1-right">
					欢迎登录幸福兄弟拼购网！ |
					<a href="<%=basePath%>login.html" target="_top" title="登录">登录</a>
					|
					<a href="<%=basePath%>user/goForWordRegister.shtml" target="_top"
						title="免费注册">免费注册</a> |&nbsp;&nbsp;
				</div>
				<%
					} else {
						userid = tsSysuser.getId().toString();
						userType = tsSysuser.getType();
				%>
				<div class="top-1-right">
					欢迎<%=tsSysuser.getUsername()%>登录幸福兄弟拼购网！ |
					<a href="<%=basePath%>loginsuccess.jsp" target="_top" title="个人管理">个人管理</a>
					|
					<a href="<%=basePath%>user/qiantanExit.shtml" target="_top"
						title="退出登录">退出登录</a>
				</div>
				<%
					}
				%>
		</div>
		<div id="top-2">
			<table width="1000" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="79" height="88">
						<div class="top-2-1"></div>
					</td>
					<td width="10px">
						&nbsp;
					</td>
					<td width="157px"
						style="background: url(<%=basePath%>resource/img/index/logo4.jpg) no-repeat center;">
					</td>
					<td width="214px"
						style="background: url(<%=basePath%>resource/img/index/logo5.jpg) no-repeat center;">
						<div style="padding-top: 61px; height: 25px">
							<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
								codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
								width="214" height="25">
								<param name="movie"
									value="<%=basePath%>resource/img/index/dh.swf">
								<param name="quality" value="high">
								<embed src="<%=basePath%>resource/img/index/dh.swf" quality="high"
									pluginspage="http://www.macromedia.com/go/getflashplayer"
									type="application/x-shockwave-flash" width="214" height="25"></embed>
							</object>
						</div>
					<td
						style="background: url(<%=basePath%>resource/img/index/logo3.jpg) no-repeat center">
						<div class="top-2-2">
							<span style="color: #003366">拼购：</span>全城千万消费者聚在一起，哪个品牌商家敢不给我们最大的折扣？
							<br />
							<span style="color: #003366">拼购：</span>看得见的省钱，绝对让你省最多的钱！
							<br />
							<span style="color: #003366">拼购：</span>买最满意的产品！享受最称心的服务！
							<br />
							<span style="color: #003366">曝光维权：</span>商家如不讲诚信！
							<span style="color: #F00; font-weight: 600; font-size: 14px">800</span>万盐城人民助你讨回公道！
						</div>
					</td>
				</tr>
			</table>
		</div>
		<div id="nav">
			<table width="1000" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td
						style="background: url(../resource/img/index/sh-1.jpg) no-repeat; height: 39px; width: 11px">
						&nbsp;
					</td>
					<td width="982"
						style="background: url(../resource/img/index/sh-2.jpg) repeat-x; line-height: 33px">
						<div id="nav-1">
							<a href="<%=basePath%>home.shtml">首页</a> &gt;
							<a
								href="<%=basePath%>showCategory.shtml?categoryId=${category.id}&pid=${pcategory.id}">${pcategory.name}</a>
							&gt;
							<a
								href="<%=basePath%>showCategory.shtml?categoryId=${category.id}&pid=${pcategory.id}">${category.name}</a>
							&gt; ${tgood.name}
						</div>

					</td>
					<td
						style="background: url(../resource/img/index/sh-3.jpg) no-repeat; height: 39px; width: 7px">
						&nbsp;
					</td>
				</tr>
			</table>
		</div>

		<div id="content">
			<div id="left" align="center">
				<div class="leftTop" ></div>
					<div class="leftBody" align="center" style="margin-top:0px;">
					<div class="left1" style="margin-top:0px;">
					<div class="left1-c" align="left">
						<p style="font-size: 13px;font-weight: 200;text-indent:2em; margin-top: 0px">
							${tgood.announcement}
						</p>
						<p style=" font-size: 14px;font-weight: 200;letter-spacing: 2px;text-indent:2em;line-height:200% ">
							请真实填写商家咨询了解的相关信息，如果不实而造成纠纷，后果自负。为了舒心拼购，请主动保留相关证据。
						</p>
					</div>
				  <div class="join-info" align="center">
							<span><img src="<%=basePath %>resource/img/t-b1.gif"/><script>drawJoinMem('${count}')</script><img src="<%=basePath %>resource/img/t-b2-qg.gif"/></span>
				 </div>
					<div class="left2-2">
						<table width="240px" border="0" cellspacing="0" cellpadding="0">
							<tr style="height: 100px;">
									<td align="left">
									<input type="hidden" value="${tgood.id}" id="goods"/>
										<div class="left2-4" align="center" style="background: url('<%=basePath %>resource/img/canjia-qg.jpg') no-repeat;height:75px">
											<nobr><span>
											<s:if test='%{#tgood.tel == null||#tgood.tel == ""}'>暂无资料</s:if>
											<s:else>
												${tgood.tel}
											</s:else>
											</span></nobr>
										</div>
									</td>
								</tr>
							<tr>
								<td colspan="2">
									<table width="230px" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="80" align="right">
												<div class="quandianping">
													<label for="textfield">
														真实姓名：
													</label>
												</div>
											</td>
											<td align="left">
												<div class="quandianping">
													<input type="text" name="textfield" id="realname" style="width: 100px"/>
													<em style="color: #F00">*</em>
												</div>
											</td>
										</tr>
										<tr>
											<td align="right">
												<div class="quandianping">
													<label for="textfield2">
														手机：
													</label>
												</div>
											</td>
											<td align="left">
												<div class="quandianping">
													<input type="text" id="phone" name="textfield2" style="width: 100px"/>
													<em style="color: #F00">*</em>
												</div>
											</td>
										</tr>
										<tr>
											<td align="right">
												<div class="quandianping">
													<label for="textfield3">
														备用电话：
													</label>
												</div>
											</td>
											<td align="left">
												<div class="quandianping">
													<input type="text" name="textfield3" id="tel" style="width: 100px"/>
												</div>
											</td>
										</tr>
										<tr>
											<td align="right" valign="top">
												<div class="quandianping">
													<label for="textarea">
														具体地址：
													</label>
												</div>
											</td>
											<td align="left">
												<div class="quandianping">
													<textarea name="textarea" id="address" cols="20" rows="5" style="width: 120px"></textarea>
													<br />
													<span style="line-height: 25px"> 商家提供免费送货上门<em
														style="color: #F00">*</em>
													</span>
												</div>
											</td>
										</tr>
									</table>
									<table width="230px" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td
												style="padding-top: 10px; padding-left: 10px; padding-right: 10px">
												<div class="quandianping1">
													<em style="color: #F00">*</em>${tgood.stateMent}
												</div>

											</td>
										</tr>
										<tr>
											<td height="30px">
												<div class="tijiao">
														<a href="javascript:add();">提&nbsp;&nbsp;交&nbsp;</a>
												</div>
											</td>
										</tr>
										<tr>
											<td height="10px">
												&nbsp;
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>

					</div>
				</div>
					<div class="left1111" align="center">
						<div class="left3-1" align="left">
							<nobr>已参加<font
								style="font-weight: bold; padding-left: 3px; padding-right: 3px;">${tgood.shortName}</font>抢购的业主：</nobr>
						</div>
					<div class="left1-2">
					 <ul>
							<s:if test="%{#goodsmemberlist == null||#goodsmemberlist.size()==0}">暂时没有业主参与</s:if>
							<s:iterator value="#goodsmemberlist" status="stat" var="member">
								<li>
									<p style="font-size: 14px; color: #036;border-bottom: 1px dotted #C2D5E3; ">
										<s:property value="#member.showName" />
										&nbsp;&nbsp;
										<span style="color: #F60; font-size: 14px"><s:property
												value="#member.joinDateFormat" />
										</span>
									</p>
								</li>
							</s:iterator>
						</ul>
					</div>
				</div>
			</div>
			<div class="leftBotton"></div>
			</div>
			<div id="right">
				<input type="hidden" value="${tgood.id}" id="goods" />
				<h3>
					${tgood.name}
				</h3>
				<div class="right1">
					<table width="736px" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="302">
								<div class="right-px1">
									<img height="240px" width="300px"
										src="<%=basePath%>${tgood.imgSrc}" />
								</div>
							</td>
							<td width="10px">
								&nbsp;
							</td>
							<td align="left" valign="top" >
								<table width="424" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td
											style="border-bottom: dotted #999 1px; border-right: dotted #999 1px; border-top: dotted #999 1px"
											width="80px" align="left">
											<div class="quandianping2">
												原价：
											</div>
										</td>
										<td
											style="border-bottom: dotted #999 1px; border-top: dotted #999 1px">
											<div class="quandianping2">
												${tgood.price}
											</div>
										</td>
									</tr>
									<tr>
										<td
											style="border-bottom: dotted #999 1px; border-right: dotted #999 1px"
											align="left" valign="top">
											<div class="quandianping2">
												拼抢价：
											</div>
										</td>
										<td style="border-bottom: dotted #999 1px" height="60px"
											align="left" valign="top">
											<div class="quandianping2">
												${tgood.upprice}
												<br />
											</div>
										</td>
									</tr>
									<tr>
										<td
											style="border-bottom: dotted #999 1px; border-right: dotted #999 1px"
											align="left" valign="top">
											<div class="quandianping2">
												拼抢说明：
											</div>
										</td>
										<td style="border-bottom: dotted #999 1px" height="60px"
											align="left" valign="top">
											<div class="quandianping2">
												${tgood.content}
											</div>
										</td>
									</tr>

								</table>
							</td>
						</tr>
					</table>
				</div>

				<div class="right1">

					<h1>
						产品说明：
					</h1>
					<div class="right1-1">
						${tgood.goodsDesc}
					</div>

				</div>


			</div>
		</div>
		<iframe src="<%=basePath%>/index/footer.html" frameborder="0"
			scrolling="no" width="100%" ; height="90px;"></iframe>
		<script>
		function getHeight(id){
			return jQuery('#'+id).height();
		}
		try{
			jQuery('.leftBody').height(getHeight('left')-10);
		}catch(e){}
    var  basepath="<%=basePath%>";
    var userid="<%=userid%>"
  function add(){
              if(userid==""){
                 alert("请先登录");
                 return;
              }
              var  realname= $("#realname").val();
              if(""== realname){
                  alert("请填写真实姓名");
                   $("#realname").focus();
                   return ;
              }
             
              var  phone= $("#phone").val();
              if(""== phone){
                  alert("请填写手机");
                 $("#phone").focus();
                  return ;
              }
              var  tel= $("#tel").val();  
              
              var  address= $("#address").val();  
              if(""== address){
                  alert("请填写具体地址");
                  $("#address").focus();
                  return ;
              }
              if(address.length>50){
                   alert("请填写具体地址字数太长");
                  $("#address").focus();
                  return ;
              }
              $.post( basepath+"tgBrandMember/saveOrUpdate.shtml?tgBrandMember.name="+encodeURI(encodeURI(realname))+"&tgBrandMember.tel="+phone+"&tgBrandMember.brandId="+document.getElementById("goods").value+"&tgBrandMember.telephoe="+tel+"&tgBrandMember.address="+encodeURI(encodeURI(address))+"&tgBrandMember.userId="+userid+"&tgBrandMember.type=0"
               ,function(message){
				if(message == "1"){
					alert("申请成功");
			         $("#realname").val("");
			         $("#phone").val("");
			         $("#address").val(""); 
			         $("#tel").val(""); 
				}else if(message == "2") {
					alert("申请出错");
					return;
				}
			})
	
            
		}
		
		
		function addfavorite()
{
    window.external.addFavorite('http://www.9898sj.com','幸福兄弟')  ;
} 
</script>
	</body>
</html>




